<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //展开对象
    const person={name:'aa',age:18,sex:'male'}
    console.log({...person}==person);
    //合并对象 新对象拥有全部属性，相同属性，后者覆盖前者
    const dog={dogName:'彩虹',dogAge:1,sex:'公'}
    console.log({...person,...dog});
  </script>
</body>
</html>